// 统一管理项目 用户相关的接口
import request from "@/utils/request";
// 项目用户相关的请求地址
enum API {
    NOTICE_TYPE = "/noticeType",
    NOTICE_TYPE_TOTAL = "/noticeType/total",
    SEARCH_NOTICE_TYPE = "/noticeType/search",
    ADD_NOTICE_TYPE = "/noticeType/add",
    UPDATE_NOTICE_TYPE = "/noticeType/update",
    DELETE_NOTICE_TYPE = "/noticeType/delete",
    DELETE_NOTICE_TYPES = "/noticeType/deletes",
    UPDATE_NOTICE_TYPE_STATUS = "/noticeType/updateStatus"
}

export const reqNoticeType = (pageNo: number, limit: number) => request.get(`${API.NOTICE_TYPE}/${pageNo}/${limit}`);

export const reqNoticeTypeTotal = () => request.get(`${API.NOTICE_TYPE_TOTAL}`);

export const reqSearchNoticeType = (data: any) => request.post(`${API.SEARCH_NOTICE_TYPE}`, data, { headers: { "Content-Type": "application/json" } });

export const reqAddNoticeType = (data: any) => request.post(`${API.ADD_NOTICE_TYPE}`, data, { headers: { "Content-Type": "application/json" } });

export const reqUpdateNoticeType = (data: any) => request.post(`${API.UPDATE_NOTICE_TYPE}`, data, { headers: { "Content-Type": "application/json" } });

export const reqDeleteNoticeType = (id: number) => request.delete(`${API.DELETE_NOTICE_TYPE}/${id}`);

export const reqDeleteNoticeTypes = (ids: number[]) => request.post(`${API.DELETE_NOTICE_TYPES}`, ids, { headers: { "Content-Type": "application/json" } });

export const reqUpdateNoticeStatus = (data: any) => request.put(`${API.UPDATE_NOTICE_TYPE_STATUS}`, data, { headers: { "Content-Type": "application/json" } });